<?php

include 'source/define.php';
include ROOT_PATH . 'source/mysql_connect.php';
$categories = mysql_select_array("SELECT * FROM `category` WHERE `active`=1 ORDER BY `priority` ASC");
if ($_GET['id'] > 0) {
    $product = mysql_row_assoc("SELECT * FROM `product` WHERE `id`=?", $_GET['id']);
    $images = mysql_select_array("SELECT * FROM `img` WHERE `prod_id`=?", $product['id']);
}
$TITLE = $product['title'] . " &bull; " . $TITLE;
$META_KEYWORDS = $product['keywords'] . ", " . str_replace(' &bull;', ',', $TITLE);
include ROOT_PATH . "templates/header.php";
include ROOT_PATH . "templates/product.php";
include ROOT_PATH . "templates/footer.php";